// app.js
App({
  onLaunch: function () {
    // 展示本地存储能力
    const logs = wx.getStorageSync('logs') || []
    logs.unshift(Date.now())
    wx.setStorageSync('logs', logs)

    // 获取系统信息
    wx.getSystemInfo({
      success: res => {
        this.globalData.systemInfo = res
        this.globalData.screenWidth = res.windowWidth
        this.globalData.screenHeight = res.windowHeight
      }
    })
  },
  
  globalData: {
    systemInfo: null,
    screenWidth: 0,
    screenHeight: 0,
    highScore: 0
  }
})
